﻿CREATE TABLE [dbo].[Order] (
    [Id]              INT           IDENTITY (1, 1) NOT NULL,
    [Customer_Id]     INT           NOT NULL,
    [Delevery_Att]    NVARCHAR (50) NULL,
    [Delevery_Name]   NVARCHAR (50) NULL,
    [Delevery_Street] NVARCHAR (50) NULL,
    [Delevery_Zip]    NVARCHAR (20) NULL,
    [Delevery_City]   NVARCHAR (50) NULL,
    [Created]         DATETIME      CONSTRAINT [DF_Order] DEFAULT (getdate()) NOT NULL,
    [Cust_Order_Ref]  NVARCHAR (50) NULL,
    CONSTRAINT [PK_Order] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Order_Customer] FOREIGN KEY ([Customer_Id]) REFERENCES [dbo].[Customer] ([Id])
);

